import React, { useState } from 'react';
import { AsyncSelect } from '@ecoding/components.antd';

const C = () => {
    const [v, setV] = useState();
    return (
        <AsyncSelect
            onChange={(v) => setV(v)}
            iface={{
                url: "https://f2e-api.sciecomm.cn/f2e/mock/list",
                format2: { value: "id", label: "name" },
            }}
            value={v}
            style={{width: '100%'}}
            placeholder="请选择"
        />
    );
}

export default C;